<?xml version="1.0" encoding="utf-8"?>
<!--  This Content Type is placed on a page where a feed will be generated from, it will control the settings for the 
      feed and the feed items 
-->
<Content type="xform" name="EditContent">
  <model>
    <instance>
      <tblContent>
        <nContentKey/>
        <nContentPrimaryId/>
        <nVersion/>
        <cContentForiegnRef/>
        <cContentName/>
        <cContentSchemaName>FeedControl</cContentSchemaName>
        <cContentXmlBrief>
          <Content>
            <contentType/>
            <channel>
              <title/>
              <link/>
              <description/>
              <language>en-gb</language>
              <pubDate/>
              <lastBuildDate/>
              <copyright/>
              <category/>
              <docs/>
              <managingEditor/>
              <webMaster/>
              <generator>eonicweb4 Content Management System</generator>
              <ttl>60</ttl>
              <image>
                <url/>
                <title/>
                <link/>
              </image>
              <cloud domain="" port="" path="" registerProcedure="" protocol=""/>
              <rating/>
              <textInput/>
              <skipHours/>
              <skipDays/>
            </channel>
          </Content>
        </cContentXmlBrief>
        <cContentXmlDetail/>
        <nAuditId/>
        <nAuditKey/>
        <dPublishDate/>
        <dExpireDate/>
        <dInsertDate/>
        <nInsertDirId/>
        <dUpdateDate/>
        <nUpdateDirId/>
        <nStatus>1</nStatus>
        <cDescription/>
      </tblContent>
    </instance>
    <submission id="EditContent" action="" method="post" event="return form_check(this)"/>

    <bind nodeset="tblContent">
      <bind id="dPublishDate" nodeset="dPublishDate" required="false()" type="string"/>
      <bind id="dExpireDate" nodeset="dExpireDate" required="false()" type="string"/>
      <bind id="nStatus" nodeset="nStatus" required="true()" type="string"/>
      <bind id="cTitle" nodeset="cContentName" required="true()" type="string"/>
      <bind id="bCascade" nodeset="bCascade" required="false()" type="string"/>
      <bind id="cContentType" nodeset="cContentXmlBrief/Content/contentType" required="true()" type="string"/>

      <bind nodeset="cContentXmlBrief/Content/channel">

        <bind id="cTitle" nodeset="title" required="true()" type="string"/>
        <bind id="cLink" nodeset="link" required="true()" type="string"/>
        <bind id="cFeedDescription" nodeset="description" required="true()" type="string"/>

        <bind id="cCopyright" nodeset="copyright" required="false()" type="string"/>
        <bind id="cManagingEditor" nodeset="managingEditor" required="false()" type="string"/>
        <bind id="cWebMaster" nodeset="webMaster" required="false()" type="string"/>
        <bind id="cTtl" nodeset="ttl" required="false()" type="number"/>
        <bind id="cCategory" nodeset="category" required="false()" type="string"/>

        <bind nodeset="image">
          <bind id="cTitle" nodeset="title" required="true()" type="string"/>
          <bind id="cLink" nodeset="link" required="true()" type="string"/>
          <bind id="cImage" nodeset="url" required="false()" type="string"/>
        </bind>


      </bind>
    </bind>
  </model>
  <group ref="EditContent" class="2col">
    <label>Edit Feed Output</label>
    <group ref="Settings" class="leftSettings">
      <input bind="nContentKey" class="hidden">
        <label>ContentId</label>
      </input>
      <label>Settings</label>
      <input bind="dPublishDate" class="calendar short">
        <label>Publish Date</label>
      </input>
      <input bind="dExpireDate" class="calendar short">
        <label>Expire Date</label>
      </input>
      <select1 bind="nStatus" appearance="minimal" class="required short">
        <label>Status</label>
        <item>
          <label>Live</label>
          <value>1</value>
        </item>
        <item>
          <label>Hidden</label>
          <value>0</value>
        </item>
      </select1>
      <select bind="bCascade" appearance="full">
        <label>Cascade to Child Pages</label>
        <item>
          <label/>
          <value>true</value>
        </item>
      </select>
      <input bind="cDescription" class="short">
        <label>Change Notes</label>
      </input>
    </group>
    <group ref="Content">
      <label>Feed Configuration</label>
      <help>This helps to define a feed that will be generated from this page.</help>

      <select1 bind="cContentType" appearance="minimal" class="required short">
        <label>Content Type to send to Feed</label>
        <item>
          <label>News Article</label>
          <value>NewsArticle</value>
        </item>
        <item>
          <label>All applicable types</label>
          <value>All</value>
          <help>Rather than only show one type of content, this will show all types that can are appropriate for feed content</help>
        </item>
      </select1>

      <group ref="Mandatory">
        <label>Mandatory settings</label>
        <input bind="cTitle" class="required">
          <label>Feed Title</label>
          <help>The name of the channel. It's how people refer to your service.</help>
        </input>
        <input bind="cLink" class="required">
          <label>Feed Link</label>
          <help>The URL to the HTML website corresponding to the channel.</help>
        </input>
        <input bind="cFeedDescription" class="required">
          <label>Feed Description</label>
        </input>

      </group>

      <group ref="Optional">
        <label>Optional settings</label>
        <input bind="cCopyright">
          <label>Copyright Notice</label>
          <help>Copyright notice for content in the channel</help>
        </input>
        <input bind="cManagingEditor">
          <label>Managing Editor</label>
          <help>Email address for person responsible for editorial content.  Format must be "john@domain.co.uk (John Smith)"</help>
        </input>
        <input bind="cWebMaster">
          <label>WebMaster</label>
          <help>Email address for person responsible for technical issues relating to channel. Format must be "john@domain.co.uk (John Smith)"</help>
        </input>
        <input bind="cCategory">
          <label>Category</label>
          <help>Specify one or more categories that the channel belongs to. </help>
        </input>
        <input bind="cTtl">
          <label>Time To Live</label>
          <help>
            This is the a number of minutes that indicates how long a channel can be cached before
            refreshing from the source.
          </help>
        </input>
        <input bind="cImage">
          <label>Image URL</label>
          <help>Image that can be shown for the channel as a whole</help>
        </input>
      </group>

      <submit submission="" ref="ewSubmit" class="principle">
        <label>Save Feed Control</label>
      </submit>
    </group>

  </group>
</Content>
